home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1995-03-02 | 3.5 KB | 82 lines | [TEXT/3PRM] |
- definition module windowDef;
-
- // Version 0.8 to 1.0
-
- //
- // WindowDefinitions:
- //
-
-
- import commonDef;
- from deltaPicture import Picture, Rectangle, DrawFunction;
-
-
- :: WindowDef *s *io
- = ScrollWindow WindowId WindowPos WindowTitle
- ScrollBarDef ScrollBarDef
- PictureDomain MinimumWindowSize InitialWindowSize
- (UpdateFunction s) [WindowAttribute s io]
- | FixedWindow WindowId WindowPos WindowTitle
- PictureDomain (UpdateFunction s) [WindowAttribute s io];
-
- :: WindowId :== Int;
- :: WindowPos :== (!Int, !Int);
- :: WindowTitle :== String;
- :: ScrollBarDef = ScrollBar ThumbValue ScrollValue;
- :: ThumbValue = Thumb Int;
- :: ScrollValue = Scroll Int;
- :: MinimumWindowSize :== (!Int, !Int);
- :: InitialWindowSize :== (!Int, !Int);
- :: UpdateArea :== [Rectangle];
- :: UpdateFunction *s :== UpdateArea -> (s -> (s,[DrawFunction]));
-
- :: WindowAttribute *s *io
- = Activate (WindowFunction s io)
- | Deactivate (WindowFunction s io)
- | GoAway (WindowFunction s io)
- | Mouse SelectState (MouseFunction s io)
- | Keyboard SelectState (KeyboardFunction s io)
- | Cursor CursorShape
- | StandByWindow;
-
- :: WindowFunction *s *io :== s -> *(io -> (s, io));
- :: MouseFunction *s *io :== MouseState -> (s -> *(io -> (s, io)));
- :: KeyboardFunction *s *io :== KeyboardState-> (s -> *(io -> (s, io)));
-
- :: CursorShape = StandardCursor | BusyCursor | IBeamCursor
- | CrossCursor | FatCrossCursor | ArrowCursor | HiddenCursor;
-
-
- IsScrollWindow :: !(WindowDef s io) -> Bool;
- WindowDefGetWindowId :: !(WindowDef s io) -> WindowId;
- WindowDefGetPosition :: !(WindowDef s io) -> WindowPos;
- WindowDefGetTitle :: !(WindowDef s io) -> String;
- WindowDefGetScrollBarDefs :: !(WindowDef s io) -> (!ScrollBarDef, !ScrollBarDef);
- WindowDefGetPictureDomain :: !(WindowDef s io) -> PictureDomain;
- WindowDefGetMinimumSize :: !(WindowDef s io) -> MinimumWindowSize;
- WindowDefGetFinalMinimumSize :: !(WindowDef s io) -> MinimumWindowSize;
- WindowDefGetInitialSize :: !(WindowDef s io) -> InitialWindowSize;
- WindowDefGetUpdate :: !(WindowDef s io) -> UpdateFunction s;
-
- WindowDefHasAttribute :: !(WindowDef s io) !(WindowAttribute s io) -> Bool;
- WindowDefIsStandBy :: !(WindowDef s io) -> Bool;
- WindowDefGetActivate :: !(WindowDef s io) -> WindowFunction s io;
- WindowDefGetDeactivate :: !(WindowDef s io) -> WindowFunction s io;
- WindowDefGetGoAway :: !(WindowDef s io) -> WindowFunction s io;
- WindowDefGetCursor :: !(WindowDef s io) -> CursorShape;
- WindowDefGetKeyboard :: !(WindowDef s io) -> (!SelectState, !KeyboardFunction s io);
- WindowDefGetMouse :: !(WindowDef s io) -> (!SelectState, !MouseFunction s io);
-
- ScrollBarDefGetValues :: !ScrollBarDef -> (!Int, !Int);
-
- WindowDefSetPictureDomain :: !PictureDomain !(WindowDef s io) -> WindowDef s io;
- WindowDefSetUpdate :: !(UpdateFunction s) !(WindowDef s io) -> WindowDef s io;
- WindowDefSetActivate :: !(WindowFunction s io) !(WindowDef s io) -> WindowDef s io;
- WindowDefSetDeactivate :: !(WindowFunction s io) !(WindowDef s io) -> WindowDef s io;
- WindowDefSetGoAway :: !(WindowFunction s io) !(WindowDef s io) -> WindowDef s io;
- WindowDefSetScrollBarDefs :: !(!(!Int,!Int), !(!Int,!Int)) !(WindowDef s io) -> WindowDef s io;
- WindowDefSetMinimumSize :: !MinimumWindowSize !(WindowDef s io) -> WindowDef s io;
- WindowDefSetCursor :: !CursorShape !(WindowDef s io) -> WindowDef s io;
- WindowDefSetKeyboard :: !SelectState !(KeyboardFunction s io) !(WindowDef s io) -> WindowDef s io;
- WindowDefSetMouse :: !SelectState !(MouseFunction s io) !(WindowDef s io) -> WindowDef s io;